﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Com.ProjectA.Utility
{
    public class Constants
    {
        #region FOR CONNECTION STRING
        public enum ConnectionStructureType
        {
            /// <summary>
            /// Connection string structure for standard security - A
            /// <para>Ex: Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;</para>
            /// </summary>
            A,
            /// <summary>
            /// Connection string structure for trusted connection - B
            /// <para>Ex: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;</para>
            /// </summary>
            B,
            /// <summary>
            /// Connection string structure for SQL Server instance - C
            /// <para>Ex: Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;</para>
            /// </summary>
            C,
            /// <summary>
            /// Connection string structure for SQL Server instance - D
            /// <para>Ex: Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;</para>
            /// </summary>
            D,
            /// <summary>
            /// Connection string structure for connection via IP address -  E
            /// <para>Ex: Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;</para>
            /// </summary>
            E,
            /// <summary>
            /// Connection string structure for connection enable MARS (MultipleActiveResults) - F
            /// <para>Ex: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true;</para>
            /// </summary>
            F,
            /// <summary>
            /// Connection string structure for connection with attach a db file on local SQL Server Express instance or located in a data directory - G
            /// <para>Ex: Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;Trusted_Connection=Yes;</para>
            /// <para>Or Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;</para>
            /// </summary>
            G,
            /// <summary>
            /// Connection string structure for connection using an user instance on local SQL Server Express instance - H
            /// <para>Ex: Data Source=.\SQLExpress;Integrated Security=true;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;User Instance=true;</para>
            /// </summary>
            H,
            /// <summary>
            /// Connection string structure for asynchronous processing of requests through ADO.NET objects - K
            /// <para>Ex: Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;</para>
            /// </summary>
            K,
            Y
        }
        /// <summary>
        /// Connection string structure for standard security
        /// <para>Ex: Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_STANDARD_SEC = @"Server={0};Database={1};User Id={2};Password={3};";
        /// <summary>
        /// Connection string structure for trusted connection
        /// <para>Ex: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_TRUSTED_CONN = @"Server={0};Database={1};Trusted_Connection={2};";
        /// <summary>
        /// Connection string structure for SQL Server instance
        /// <para>Ex: Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;Password=myPassword;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_SQLSERVER_INSTANCE = @"Server={0};Database={1};User Id={2};Password={3};";
        /// <summary>
        /// Connection string structure for trusted connection from CE device
        /// <para>Ex: Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;User ID=myDomain\myUsername;Password=myPassword;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_CE_DEVICE = @"Data Source={0};Initial Catalog={2};Integrated Security={3};User ID={4};Password={5};";
        /// <summary>
        /// Connection string structure for connection via IP address
        /// <para>Ex: Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;User ID=myUsername;Password=myPassword;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_VIA_IP = @"Data Source={0};Network Library={1};Initial Catalog={2};User ID={3};Password={4};";
        /// <summary>
        /// Connection string structure for connection enable MARS (MultipleActiveResults)
        /// <para>Ex: Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;MultipleActiveResultSets=true;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_MARS = @"Server={0};Database={1};Trusted_Connection={2};MultipleActiveResultSets={3};";
        /// <summary>
        /// Connection string structure for connection with attach a db file on local SQL Server Express instance or located in a data directory
        /// <para>Ex: Server=.\SQLExpress;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;Database=dbname;Trusted_Connection=Yes;</para>
        /// <para>Or Server=.\SQLExpress;AttachDbFilename=|DataDirectory|mydbfile.mdf;Database=dbname;Trusted_Connection=Yes;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_ATTACH_LOCAL = @"Server={0};AttachDbFilename={1};Database={2};Trusted_Connection={3};";
        /// <summary>
        /// Connection string structure for connection using an user instance on local SQL Server Express instance
        /// <para>Ex: Data Source=.\SQLExpress;Integrated Security=true;AttachDbFilename=C:\MyFolder\MyDataFile.mdf;User Instance=true;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_ATTACH_LOCAL_USER_INSTANCE = @"Data Source={0};Integrated Security={1};AttachDbFilename={2};User Instance={3};";
        /// <summary>
        /// Connection string structure for asynchronous processing of requests through ADO.NET objects
        /// <para>Ex: Server=myServerAddress;Database=myDataBase;Integrated Security=True;Asynchronous Processing=True;</para>
        /// </summary>
        public const string STR_CONN_STRING_STRUCTURE_ASYN_PROCESS = @"Server={0};Database={1};Integrated Security={2};Asynchronous Processing={3};";
        /// <summary>
        /// Connection name used to define an connection string in web.config
        /// </summary>
        public const string STR_CONN_NAME = "DefaultConnection";
        #endregion FOR CONNECTION STRING

        #region FOR REGULAR EXPRESSION
        /// <summary>
        /// Pattern regular expression {\S\d*}
        /// </summary>
        public const string STR_REGEX_PATTERN_BLOCK = @"{\S\w*}";
        
        #endregion FOR REGULAR EXPRESSION

        #region FOR SPECIAL CHARACTERS
        /// <summary>
        /// Special character: Open block - {
        /// </summary>
        public const string STR_SPECIAL_CHAR_OPEN_BLOCK = @"{";
        /// <summary>
        /// Special character: Close block - }
        /// </summary>
        public const string STR_SPECIAL_CHAR_CLOSE_BLOCK = @"}";
        #endregion FOR SPECIAL CHARACTERS

        #region FOR GENEALOGIC
        public enum KindOfBrother
        {
            sibling = 0,
            siblingSameMother = 1,
            siblingMomInLaw = 2,
            siblingDadInLaw = 3,
            cousin = 4
        }
        #endregion FOR GENEALOGIC

        #region FOR MESSAGE NOTIFIER
        public enum MessageType
        {
            Error = 0,
            Success = 1,
            Warning = 2
        }
        #endregion FOR MESSAGE NOTIFIER
    }
}
